Number Utilities
Number Utilities
The Script Manager number utilities let you change the ways numbers are
represented so they can be displayed in various international formats. A
canonical number format is a private, internal format that specifies the
number format in a way that is independent of region, language, and other
multicultural considerations.
Converting to and From Canonical Number Formats
The Str2Format and Format2Str functions change format strings typed by
users into a private, internal format and let applications change private,
internal formats into localized format strings.
Str2Format Converts a format string typed by users into a
canonical number format
Format2Str Allows programs to convert previously entered
canonical number formats to a format string that
depends on the localized version of the system software
Working With Formatted Numbers
The FormatX2Str and FormatStr2X functions change an internal
floating-point representation of a number into a localized formatted numeric
string and vice versa.
FormatX2Str Converts an internal floating-point (SANE)
representation of a number into a localized formatted
numeric string
Note: If you compile your application to use the 881 option, you
need to convert 96-bit numbers to 80-bit numbers before they can
be passed to FormatX2Str.
FormatStr2X Converts a localized formatted numeric string into an
internal floating-point representation of a number
Note: FormatStr2X returns an 80-bit, not a 96-bit,
representation.